<include file="Public/common1" />
<block name="css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/Operator/css/order_detail.css">
</block>
<block name="content">
    <h4>订单信息</h4>
    <section class="order-detail">
        <div class="row">
            <div class="col-xs-2 text-right border ">订单状态：</div>
            <div class="col-xs-4 ">{$ob.order.order_status_content}</div>
            <div class="col-xs-2 text-right border ">线路名称：</div>
            <div class="col-xs-4 ">{$ob.order.line_name}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border ">订单号：</div>
            <div class="col-xs-4 ">{$ob.order.order_num}</div>
            <div class="col-xs-2 text-right border">出团日期：</div>
            <div class="col-xs-4 ">{$ob.order.out_time|date="Y-m-d",###}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border">下单时间：</div>
            <div class="col-xs-4 ">{$ob.order.create_time|date="Y-m-d",###}</div>
            <div class="col-xs-2 text-right border">出游人数：</div>
            <div class="col-xs-4 ">{$ob.order.total_num}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border">联系人：</div>
            <div class="col-xs-4 ">{$ob.contact.name}</div>
            <div class="col-xs-2 text-right border">团号：</div>
            <div class="col-xs-4 ">{$ob.order.group_num}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border">订单备注：</div>
            <div class="col-xs-4 ">{$ob.order.order_remarks}</div>
        </div>
    </section>



    <ul id="nav" class="nav nav-tabs">
        <!-- <li role="presentation" ><a href="javascript:void(0)">退款</a></li> -->
        <li role="presentation" class="active"><a href="javascript:void(0)">收款明细</a></li>
    </ul>
    <!-- 退款 -->
    <!--  <section class="clearfix" id="refund">
         <div class="col-xs-12 clearfix mt-15">
             <label class="col-xs-2 border text-right">实收金额：</label>
             <div class="col-xs-8">
                 <div class="input-group">
                     <span class="input-group-addon">&#165;</span>
                     <input type="number" disabled value="" class="form-control" placeholder="">
                 </div>
             </div>
         </div>

         <div class="col-xs-12 clearfix mt-15">
             <label class="col-xs-2 border text-right">可退金额：</label>
             <div class="col-xs-8">
                 <div class="input-group">
                     <span class="input-group-addon">&#165;</span>
                     <input type="number" disabled value="{$ob.order.back_money}" class="form-control" placeholder="">
                 </div>
             </div>
         </div>
     </section> -->
    <!-- 收款明细 -->
    <section class="clearfix" id="income">
        <div class="col-xs-12 clearfix mt-15">
            <label class="col-xs-2 border text-right">实收金额：</label>
            <div class="col-xs-8">
                <div class="input-group">
                    <span class="input-group-addon">&#165;</span>
                    <input type="number" disabled value="{$ob.order.end_need_pay}" class="form-control" placeholder="">
                </div>
            </div>
        </div>

        <div class="col-xs-12 clearfix mt-15">
            <label class="col-xs-2 border text-right">结算金额：</label>
            <div class="col-xs-8">
                <div class="input-group">
                    <span class="input-group-addon">&#165;</span>
                    <input type="text" disabled value="{$ob.order.close_money}"  class="form-control" placeholder="">
                </div>
            </div>
        </div>

        <div class="col-xs-12 clearfix mt-15">
            <label class="col-xs-2 border text-right">其他毛利：</label>
            <div class="col-xs-8">
                <div class="input-group">
                    <span class="input-group-addon">&#165;</span>
                    <input type="text" disabled value="{$ob.order.profit}" class="form-control" placeholder="">
                </div>
            </div>
        </div>
    </section>

    <!-- 发票明细 -->
    <h4>发票明细</h4>
    <section>
        <div class="row">
            <div class="col-xs-2 text-right border ">发票代码：</div>
            <div class="col-xs-4 ">{$ob.receipt.receipt_code}</div>
            <div class="col-xs-2 text-right border ">发票号码：</div>
            <div class="col-xs-4 ">{$ob.receipt.receipt_num}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border ">发票金额：</div>
            <div class="col-xs-4 ">{$ob.receipt.receipt_amount}</div>
            <div class="col-xs-2 text-right border">开具人：</div>
            <div class="col-xs-4 ">{$ob.receipt.open_user}</div>
        </div>
        <div class="row">
            <div class="col-xs-2 text-right border">发票抬头：</div>
            <div class="col-xs-4 ">{$ob.receipt.receipt_code}</div>
            <div class="col-xs-2 text-right border">发票内容：</div>
            <div class="col-xs-4 ">{$ob.receipt.receipt_content}</div>
        </div>

        <div class="row">
            <div class="col-xs-2 text-right border">发票备注：</div>
            <div class="col-xs-4 ">{$ob.receipt.remarks}</div>
        </div>
    </section>
    <section class="info-warp">
        <h4>交通服务</h4>
        <div class="col-xs-12 clearfix info-title">
            <div class="col-xs-6">交通 标准</div>
            <div class="col-xs-6">交通 升级</div>
        </div>
        <div class="col-xs-12 clearfix">
            <!-- 标准交通方式去 -->
            <if condition="$traffic['go']">
                <div class="col-xs-6">
                    <div class="col-xs-2 text-right border">{$go_traffic_name}(去)：</div>
                    <div class="col-xs-10">
                        <a class="btn btn-info">{$traffic['go']['seat_name']}<br/>成人 * {$traffic['go']['adult_count']} &nbsp; 儿童：{$traffic['go']['child_count']}</a>
                    </div>
                </div>
            </if>
            <!-- 升级交通方式去 -->
            <if condition="$up_traffic['go']">
                <div class="col-xs-6">
                    <div class="col-xs-2 text-right border">(去)：</div>
                    <div class="col-xs-10">
                        <foreach name="up_traffic['go']" item="v">
                            <a class="btn btn-info">{$v['seat_name']}<br/>成人 * {$v['adult_count']} &nbsp; 儿童：{$v['child_count']}</a>
                        </foreach>
                    </div>
                </div>
            </if>
        </div>
        <!-- 标准交通方式回 -->
        <div class="col-xs-12 clearfix">
            <if condition="$traffic['back']">
                <div class="col-xs-6">
                    <div class="col-xs-2 text-right border">{$go_traffic_name}(回)：</div>
                    <div class="col-xs-10">
                        <a class="btn btn-info">{$traffic['back']['seat_name']}<br/>成人 * {$traffic['back']['adult_count']} &nbsp; 儿童：{$traffic['back']['child_count']}</a>
                    </div>
                </div>
            </if>
            <!-- 升级交通方式回 -->
            <if condition="$up_traffic['back']">
                <div class="col-xs-6">
                    <div class="col-xs-2 text-right border">(回)：</div>
                    <div class="col-xs-10">
                        <foreach name="up_traffic['back']" item="v">
                            <a class="btn btn-info">{$v['seat_name']}<br/>成人 * {$v['adult_count']} &nbsp; 儿童：{$v['child_count']}</a>
                        </foreach>
                    </div>
                </div>
            </if>
        </div>
        <h4>酒店服务</h4>
        <div class="col-xs-12 clearfix info-title">
            <div class="col-xs-6">酒店 标准</div>
            <div class="col-xs-6">酒店 升级</div>
        </div>
        <foreach name="hotel" key="k" item="v">
            <!-- 每天标准酒店 -->
            <div class="col-xs-12 clearfix ">
                <div class="col-xs-6">
                    <div class="col-xs-2 text-right border">{$k}：</div>
                    <div class="col-xs-10">
                        <foreach name="v['standrand']" item="standrand">
                            <a class="btn btn-info">{$standrand['supplier_name']}<br/>{$standrand['room_name']} * {$standrand['room_count']}</a>
                        </foreach>
                    </div>
                </div>
                <!-- 每天升级酒店 -->
                <if condition="$v['up']">
                    <div class="col-xs-6">
                        <div class="col-xs-2 text-right border">{$k}：</div>
                        <div class="col-xs-10">
                            <foreach name="v['up']" item="up">
                                <a class="btn btn-info">{$up['supplier_name']}<br/>{$up['room_name']} * {$up['room_count']}</a>
                            </foreach>
                        </div>
                    </div>
                </if>

            </div>
        </foreach>
        <h4>附加产品</h4>
        <div class="col-xs-12 clearfix mt-10" >
            <foreach name="product" item="v">
                <a class="btn btn-info">{$v['product_name']}</a>
            </foreach>
        </div>
        <h4>其他</h4>
        <div class="col-xs-12 clearfix mt-10" >
            <!-- 保险 -->
            <if condition="$insure">
                <a class="btn btn-info">保险<br/>{$v['insure_name']}</a>
            </if>
            <!-- 签证 -->
            <if condition="$order['visa_price']">
                <a class="btn btn-info">签证</a>
            </if>
        </div>
    </section>

    <h4>游客信息</h4>
    <table class="table table-striped table-bordered table-hover table-condensed  mt-15">
        <thead>
        <tr>
            <!-- <th>子订单号</th> -->
            <!-- <th>游客状态</th> -->
            <th>游客</th>
            <th>游客个人信息</th>
            <!-- <th>团费</th> -->
            <!-- <th>保险</th> -->
            <!-- <th>单房差</th> -->
            <!-- <th>附加产品</th> -->
            <!-- <th>总金额</th> -->
            <th>备注</th>
            <!-- <th>操作</th> -->
        </tr>
        </thead>
        <tbody>
        <foreach name="ob['tourism']" item="v" key="k">
            <tr style="">

                <!-- <td>1231521231231231</td> -->
                <!-- <td><span class="label label-success">fds</span></td> -->

                <td>

                    <if condition="$v['tourists_type'] == 1">成人
                        <elseif condition="$v['tourists_type'] == 2"/>老人
                        <else/>小孩</if>

                    <if condition="$v['is_contact']"><span class="label label-danger">联系人</span></if>
                </td>
                <td>
                    姓名：{$v['tourists_name']} <br/>
                    性别：<if condition="$v['tourists_sex'] == 1">男<else/>女</if> <br/>
                    身份证：{$v['documents_num']}<br/>
                    手机：{$v['tourists_phone']}<br/>
                </td>
                <td>{$v['tourists_remarks']}</td>

            </tr>
        </foreach>
        </tbody>
    </table>
</block>
<block name="js">

    <script>
        $('#nav').on('click', 'li', function(){
            $(this).addClass('active').siblings().removeClass('active');
            if($(this).index() == 0){
                $('#refund').show();
                $('#income').hide();
            }else{
                $('#income').show();
                $('#refund').hide();
            }
        })

        function showTourist(){
            $('#tourist').nextAll().toggle();
        }

    </script>
</block>
